﻿// Example header text. Can be configured in the options.
using System;
using System.Windows.Forms;
using vtech_frameWorks.Exceptions;

namespace vtech_formBase
{
    public partial class frmMainBase : Telerik.WinControls.UI.RadRibbonForm
    {
        public frmMainBase()
        {
            this.InitializeComponent();
        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
                case Keys.F1:
                    vtech_frameWorks.Library.ClsUtilities.ShowHelp(this.Name);
                    return true;
                case Keys.Escape:
                    this.Close();
                    return true;
            }
            return base.ProcessCmdKey(ref msg, keyData);
        }

        protected virtual void CheckPermision(string frmName)
        {
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        protected bool CheckExist(string frmName)
        {
            try
            {
                foreach (Form frm in Application.OpenForms)
                {
                    if (frm.Name == frmName)
                    {
                        frm.Focus();
                        return true;
                    }
                }
                return false;
            }
            catch (Exception ex)
            {
                ClsInformation.Error(ex.ToString());
                return false;
            }
        }

        protected virtual void btnUser_Click(object sender, EventArgs e)
        {
        }

        protected virtual void btnSystemLog_Click(object sender, EventArgs e)
        {
        }

        protected virtual void btnChangePassword_Click(object sender, EventArgs e)
        {
        }

        protected virtual void btnOption_Click(object sender, EventArgs e)
        {
        }

        protected virtual void btnUnit_Click(object sender, EventArgs e)
        {
        }

        protected virtual void btnRole_Click(object sender, EventArgs e)
        {
        }

        protected virtual void btnGroupUser_Click(object sender, EventArgs e)
        {
        }

        protected virtual void btnCreateDatabase_Click(object sender, EventArgs e)
        {

        }

        protected virtual void btnBusinessObjectCategory_Click(object sender, EventArgs e)
        {

        }
    }
}